import { articles } from "@/api/index";

export default {
  namespaced: true,
  state: {
    artlist: [],
  },
  mutations: {
    STEARTLIST(s, val) {
      s.artlist = val;
    },
  },
  getters: {},
  actions: {
    async getArtList({ commit }, id) {
      const {
        data: { data },
      } = await articles(id);
      // console.log(data.results);
      commit("STEARTLIST", data.results);
    },
  },
};
